//
//  ViewController.m
//  添加滚动模块
//
//  Created by 石虎 on 2017/10/21.
//  Copyright © 2017年 石虎. All rights reserved.
//

#import "ViewController.h"
#import "SHExpertInterrogationCollectionCell.h"
#import "SHTestCollectionViewCell.h"

#define iPhoneX ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(1125, 2436), [[UIScreen mainScreen] currentMode].size) : NO)

#define kDeviceWidth [UIScreen mainScreen].bounds.size.width
#define kDeviceScale [UIScreen mainScreen].scale
#define QSCAppDelegate (AppDelegate *)[UIApplication sharedApplication].delegate
#define kDeviceWidthPoint (kDeviceWidth * kDeviceScale)
#define KDeviceHeight (iPhoneX ? ( [UIScreen mainScreen].bounds.size.height - 54): ([[[UIDevice currentDevice] systemVersion] floatValue] < 7.0?[UIScreen mainScreen].bounds.size.height - 20 : [UIScreen mainScreen].bounds.size.height))
static NSString *const kQSCExpertInterrogationCollectionCell = @"SHExpertInterrogationCollectionCell";

@interface ViewController ()< UITableViewDelegate,UITableViewDataSource>
@property (nonatomic, strong) UITableView *myTable;

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self.view addSubview:self.myTable];
    
    
    [self.myTable reloadData];
    
}
#pragma --tableDataSource--
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    
    SHExpertInterrogationCollectionCell *cell = [tableView dequeueReusableCellWithIdentifier:kQSCExpertInterrogationCollectionCell];
    cell.selectionStyle = UITableViewCellSelectionStyleNone;
    return cell;
    
}

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
    
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    return 1;
}

- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
    
    return 60;
}


#pragma mark -- lazy method --
- (UITableView *)myTable
{
    if (!_myTable) {
        _myTable = [[UITableView alloc]initWithFrame:CGRectMake(0, 110, kDeviceWidth, KDeviceHeight - 64)];
        _myTable.delegate = self;
        _myTable.dataSource = self;
        _myTable.separatorStyle = UITableViewCellSeparatorStyleNone;
        [_myTable registerNib:[UINib nibWithNibName:@"SHExpertInterrogationCollectionCell" bundle:nil] forCellReuseIdentifier:kQSCExpertInterrogationCollectionCell];
    }
    return _myTable;
}

@end
